#!/usr/bin/env python
# -*- coding: UTF-8 -*-

import zip

class PacketExtractorFactoryError(Exception):
    def __init__(self, message):
        Exception.__init__(self, message)

class PacketExtractorFactory:
    def get_extractor(self, path):
        if zip.is_archive(path):
            return zip.ZipArchiver()

        raise PacketExtractorFactoryError('Unknown archive type = %s' % path)